package com.brillilab.service.module.message.template.impl.method;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: MultiRecommendMethodTemp
 * @ProjectName brill_lab
 * @Description: 收到管理员推荐的多条方法
 * @date 2019/5/27 19:17
 */
@Data
public class MultiRecommendMethodTemp extends AbstractMessageTemplate {

    private String PIName;
    private String methodName;
    private Integer methodCount;

    /**
     * 收到管理员推荐的多条方法
     *
     * @param labId       实验室ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param PIName      管理员姓名
     * @param methodName  方法名称
     * @param methodCount 方法个数
     * @param referId     业务关联ID
     */
    public MultiRecommendMethodTemp(Long labId, Long receiverId, Long labMemberId, String PIName, String methodName, Integer methodCount, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.MultiRecommendMethod.getValue());
        super.setTitle("您收到了管理员推荐的方法");
        String content = String.format("<span>您收到</span><span style='color:#F6AC2D'>%s</span><span>推荐的</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>方法等</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>条方法</span>",
                PIName, methodName, methodCount);
        super.setContent(content);
        super.setAppContent(String.format("您收到%s推荐的%s方法等%s条方法",
                PIName, methodName, methodCount));
        this.labMemberId = labMemberId;
        this.PIName = PIName;
        this.methodName = methodName;
        this.methodCount = methodCount;
        this.referId = referId;
    }

}
